package com.pzb.goods.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.pzb.goods.mapper.GdGoodsAttributeOptionMapper;
import com.pzb.goods.domain.GdGoodsAttributeOption;
import com.pzb.goods.service.IGdGoodsAttributeOptionService;

/**
 * 属性选项Service业务层处理
 * 
 * @author Mr_Wu
 * @date 2021-11-29
 */
@Service
public class GdGoodsAttributeOptionServiceImpl implements IGdGoodsAttributeOptionService 
{
    @Autowired
    private GdGoodsAttributeOptionMapper gdGoodsAttributeOptionMapper;

    /**
     * 查询属性选项
     * 
     * @param id 属性选项主键
     * @return 属性选项
     */
    @Override
    public GdGoodsAttributeOption selectGdGoodsAttributeOptionById(Long id)
    {
        return gdGoodsAttributeOptionMapper.selectGdGoodsAttributeOptionById(id);
    }

    /**
     * 查询属性选项列表
     * 
     * @param gdGoodsAttributeOption 属性选项
     * @return 属性选项
     */
    @Override
    public List<GdGoodsAttributeOption> selectGdGoodsAttributeOptionList(GdGoodsAttributeOption gdGoodsAttributeOption)
    {
        return gdGoodsAttributeOptionMapper.selectGdGoodsAttributeOptionList(gdGoodsAttributeOption);
    }

    /**
     * 新增属性选项
     * 
     * @param gdGoodsAttributeOption 属性选项
     * @return 结果
     */
    @Override
    public int insertGdGoodsAttributeOption(GdGoodsAttributeOption gdGoodsAttributeOption)
    {
        return gdGoodsAttributeOptionMapper.insertGdGoodsAttributeOption(gdGoodsAttributeOption);
    }

    /**
     * 修改属性选项
     * 
     * @param gdGoodsAttributeOption 属性选项
     * @return 结果
     */
    @Override
    public int updateGdGoodsAttributeOption(GdGoodsAttributeOption gdGoodsAttributeOption)
    {
        return gdGoodsAttributeOptionMapper.updateGdGoodsAttributeOption(gdGoodsAttributeOption);
    }

    /**
     * 批量删除属性选项
     * 
     * @param ids 需要删除的属性选项主键
     * @return 结果
     */
    @Override
    public int deleteGdGoodsAttributeOptionByIds(Long[] ids)
    {
        return gdGoodsAttributeOptionMapper.deleteGdGoodsAttributeOptionByIds(ids);
    }

    /**
     * 删除属性选项信息
     * 
     * @param id 属性选项主键
     * @return 结果
     */
    @Override
    public int deleteGdGoodsAttributeOptionById(Long id)
    {
        return gdGoodsAttributeOptionMapper.deleteGdGoodsAttributeOptionById(id);
    }
}
